<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">


        <ui:define name="title">
            <h:outputText value="#{bundle.ListAsoffStoreTitle}"></h:outputText>
        </ui:define>

        <ui:define name="body">
            <h:form id="AsoffStoreListForm">
                <p:panel header="#{bundle.ListAsoffStoreTitle}">
                    <p:dataTable id="datalist" value="#{asoffStoreController.items}" var="item"
                                 selectionMode="single" selection="#{asoffStoreController.selected}"
                                 paginator="true"
                                 rowKey="#{item.id}"
                                 rows="10"
                                 rowsPerPageTemplate="10,20,30,40,50"
                                 >

                        <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                        <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_unidadnegocio}"/>
                            </f:facet>
                            <h:outputText value="#{item.unidadnegocio}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_lineanegocio}"/>
                            </f:facet>
                            <h:outputText value="#{item.lineanegocio}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_id}"/>
                            </f:facet>
                            <h:outputText value="#{item.id}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_compania}"/>
                            </f:facet>
                            <h:outputText value="#{item.compania}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_tdocto}"/>
                            </f:facet>
                            <h:outputText value="#{item.tdocto}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_nodocto}"/>
                            </f:facet>
                            <h:outputText value="#{item.nodocto}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_fechaemision}"/>
                            </f:facet>
                            <h:outputText value="#{item.fechaemision}">
                                <f:convertDateTime pattern="MM/dd/yyyy" />
                            </h:outputText>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_montoorigen}"/>
                            </f:facet>
                            <h:outputText value="#{item.montoorigen}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_montopendiente}"/>
                            </f:facet>
                            <h:outputText value="#{item.montopendiente}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_cliente}"/>
                            </f:facet>
                            <h:outputText value="#{item.cliente}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_parent}"/>
                            </f:facet>
                            <h:outputText value="#{item.parent}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_nombre}"/>
                            </f:facet>
                            <h:outputText value="#{item.nombre}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_mailing}"/>
                            </f:facet>
                            <h:outputText value="#{item.mailing}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_name}"/>
                            </f:facet>
                            <h:outputText value="#{item.name}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_codigoRep}"/>
                            </f:facet>
                            <h:outputText value="#{item.codigoRep}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_repventas}"/>
                            </f:facet>
                            <h:outputText value="#{item.repventas}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_zonaventas}"/>
                            </f:facet>
                            <h:outputText value="#{item.zonaventas}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_segmento}"/>
                            </f:facet>
                            <h:outputText value="#{item.segmento}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_bu}"/>
                            </f:facet>
                            <h:outputText value="#{item.bu}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_glOffset}"/>
                            </f:facet>
                            <h:outputText value="#{item.glOffset}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_producto}"/>
                            </f:facet>
                            <h:outputText value="#{item.producto}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_descproducto}"/>
                            </f:facet>
                            <h:outputText value="#{item.descproducto}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_catcode29}"/>
                            </f:facet>
                            <h:outputText value="#{item.catcode29}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_decCc29}"/>
                            </f:facet>
                            <h:outputText value="#{item.decCc29}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_searchtype}"/>
                            </f:facet>
                            <h:outputText value="#{item.searchtype}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_pterm}"/>
                            </f:facet>
                            <h:outputText value="#{item.pterm}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_code}"/>
                            </f:facet>
                            <h:outputText value="#{item.code}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_paymentterms}"/>
                            </f:facet>
                            <h:outputText value="#{item.paymentterms}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_creditlimit}"/>
                            </f:facet>
                            <h:outputText value="#{item.creditlimit}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_ranking}"/>
                            </f:facet>
                            <h:outputText value="#{item.ranking}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_credmessage}"/>
                            </f:facet>
                            <h:outputText value="#{item.credmessage}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_tempcrmessage}"/>
                            </f:facet>
                            <h:outputText value="#{item.tempcrmessage}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_referencia}"/>
                            </f:facet>
                            <h:outputText value="#{item.referencia}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_comentario}"/>
                            </f:facet>
                            <h:outputText value="#{item.comentario}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_openorders}"/>
                            </f:facet>
                            <h:outputText value="#{item.openorders}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_rpcrrm}"/>
                            </f:facet>
                            <h:outputText value="#{item.rpcrrm}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_abac05}"/>
                            </f:facet>
                            <h:outputText value="#{item.abac05}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_cargadatos}"/>
                            </f:facet>
                            <h:outputText value="#{item.cargadatos}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListAsoffStoreTitle_fechavencimiento}"/>
                            </f:facet>
                            <h:outputText value="#{item.fechavencimiento}">
                                <f:convertDateTime pattern="MM/dd/yyyy" />
                            </h:outputText>
                        </p:column>
                        <f:facet name="footer">
                            <p:commandButton id="createButton" icon="ui-icon-plus"   value="#{bundle.Create}" actionListener="#{asoffStoreController.prepareCreate}" update=":AsoffStoreCreateForm" oncomplete="PF('AsoffStoreCreateDialog').show()"/>
                            <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{bundle.View}" update=":AsoffStoreViewForm" oncomplete="PF('AsoffStoreViewDialog').show()" disabled="#{empty asoffStoreController.selected}"/>
                            <p:commandButton id="editButton"   icon="ui-icon-pencil" value="#{bundle.Edit}" update=":AsoffStoreEditForm" oncomplete="PF('AsoffStoreEditDialog').show()" disabled="#{empty asoffStoreController.selected}"/>
                            <p:commandButton id="deleteButton" icon="ui-icon-trash"  value="#{bundle.Delete}" actionListener="#{asoffStoreController.destroy}" update=":growl,datalist" disabled="#{empty asoffStoreController.selected}"/>
                        </f:facet>
                    </p:dataTable>
                </p:panel>
            </h:form>

            <ui:include src="Create.xhtml"/>
            <ui:include src="Edit.xhtml"/>
            <ui:include src="View.xhtml"/>
        </ui:define>
    </ui:composition>

</html>
